package com.twu.biblioteca;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: mihir
 * Date: 10/10/13
 * Time: 6:10 PM
 * To change this template use File | Settings | File Templates.
 */
public class Item {
    public String itemCategory;
    public String itemName, itemCreator, itemYear, itemRating;
    public int QuantityTotal, QuantityAtLib;
    public Item(){
        QuantityAtLib = QuantityTotal = 0;
    }
    public void getDetails(){
        itemCategory = getCategory();
        itemName = getName(itemCategory);
        itemCreator = getCreator(itemCategory);
        itemRating = getRating(itemCategory);
        itemYear = getYear(itemCategory);

    }
    public String getCategory(){
        System.out.println("\nCategory 1.Book or 2.Movie");
        Scanner user_input = new Scanner( System.in );
        if(user_input.nextInt() == 1){
            return "Book" ;
        }
        else{
            return "Movie";
        }

    }
    public String getName(String itemCategory){
        System.out.println("\nEnter " + itemCategory + " Naem - ");
        Scanner user_input = new Scanner( System.in);
        return user_input.next();
    }
    public String getCreator(String itemCategory){
        System.out.println("\nEnter " + itemCategory + " Author/Director Name - ");
        Scanner user_input = new Scanner( System.in);
        return user_input.next();
    }
    public String getYear(String itemCategory){
        System.out.println("\nEnter " + itemCategory + " Year - ");
        Scanner user_input = new Scanner( System.in);
        return user_input.next();
    }
    public String getRating(String itemCategory){
        System.out.println("\nEnter " + itemCategory + " Rating - ");
        Scanner user_input = new Scanner( System.in);
        return user_input.next();
    }



}
